

**** FIGURE 1

* Figure 1 Median

preserve
keep if treatm<3 | treatm==6 
gen naivete_res=.
gen se_naivete_res=.
gen a=1

foreach i in selected control sequential feedback{
	qreg2 naivete a if dum_`i'==1 & round<9, cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1
	replace se_naivete_res=_se[_cons] if dum_`i'==1
}

collapse naivete_res se_naivete_res, by(treatment)

gen upper=naivete_res+se_naivete_res
gen lower=naivete_res-se_naivete_res


gen order=1 if treatment==0
replace order=3 if treatment==1
replace order=5 if treatment==2
replace order=7 if treatment==6

				
graph twoway 	(bar naivete_res order if treatment==0,color(gs0)) ///
				(bar naivete_res order if treatment==1, color(gs4))  ///
				(bar naivete_res order if treatment==2, color(gs8)) ///
				(bar naivete_res order if treatment==6, color(gs12))   ///
				(rcap upper lower order, lcolor(black) xtitle("") yline(0,lcolor(black) lpattern(dash)) ///
				xlabel(1 "{it:Control}" 3 "{it:Selected}" 5 "{it:Sequential}" 7 "{it:Feedback}", labsize(medlarge)) /// 
				title("Treatment comparisons (median)", color(black)) ytitle("Median χ ± s.e.m.", size(medlarge)) ///
				ylabel(-.2 0 .2 .4) yscale(range(-.2 .55)) yline(-.2,lstyle(grid))  ///
				legend(off) graphregion(fcolor(white) lcolor(white)))
				graph export "$pathout/Figs/Overview_robustness_bw.pdf", replace
restore





* Figure 1 average

preserve
keep if treatm<3 | treatm==6 

replace naivete=naivete_wins 

gen naivete_res=.
gen se_naivete_res=.
gen a=1

foreach i in selected control sequential feedback{
	reg naivete a if dum_`i'==1 & round<9, cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1
	replace se_naivete_res=_se[_cons] if dum_`i'==1
}

collapse naivete_res se_naivete_res, by(treatment)

gen upper=naivete_res+se_naivete_res
gen lower=naivete_res-se_naivete_res


gen order=1 if treatment==0
replace order=3 if treatment==1
replace order=5 if treatment==2
replace order=7 if treatment==6
				

graph twoway 	(bar naivete_res order if treatment==0,color(gs0)) ///
				(bar naivete_res order if treatment==1, color(gs4))  ///
				(bar naivete_res order if treatment==2, color(gs8)) ///
				(bar naivete_res order if treatment==6, color(gs12))  ///
				(rcap upper lower order, lcolor(black) xtitle("") yline(0,lcolor(black) lpattern(dash)) ///
				xlabel(1 "{it:Control}" 3 "{it:Selected}" 5 "{it:Sequential}" 7 "{it:Feedback}", labsize(medlarge)) ///
				title("Treatment comparisons (mean)", color(black)) ytitle("Average χ ± s.e.m.", size(medlarge)) ylabel(-.2 0 .2 .4)  /// 
				yscale(range(-.2 .55)) legend(off) graphregion(fcolor(white) lcolor(white)))
				graph export "$pathout/Figs/Overview_robustness_mean_bw.pdf", replace

restore






****** FIGURE 4

*** Figure 4 median

preserve
gen naivete_res=.
gen se_naivete_res=.
gen a=1

foreach i in simple complex few{
	qreg2 naivete a if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8), cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8)
	replace se_naivete_res=_se[_cons] if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8)
}

foreach i in nudge selected_replication{
	qreg2 naivete a if dum_`i'==1 & round<9, cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1
	replace se_naivete_res=_se[_cons] if dum_`i'==1
}

collapse naivete_res se_naivete_res, by(treatment)

gen upper=naivete_res+se_naivete_res
gen lower=naivete_res-se_naivete_res


gen order=1 if treatment==4
replace order=3 if treatment==3
replace order=5 if treatment==5
replace order=8 if treatment==8
replace order=10 if treatment==7


				
graph twoway 	(bar naivete_res order if treatment==4,color(gs0)) ///
				(bar naivete_res order if treatment==3,color(gs3)) ///
				(bar naivete_res order if treatment==5,color(gs6)) ///
				(bar naivete_res order if treatment==8,color(gs9)) ///
				(bar naivete_res order if treatment==7,color(gs12))  ///
				(rcap upper lower order, lcolor(black) ///
				xtitle("") xlabel(1 "{it:Complex}" 3 "{it:Simple}" 5 "{it:Few}" 8 "{it:Sel. repl.}" 10 "{it:Nudge}", labsize(medlarge)) ///
				title("Treatment comparisons (median)", color(black)) ytitle("Median χ ± s.e.m.", size(medlarge)) yline(0,lcolor(black) lpattern(dash)) /// 
				ylabel(0 .2 .4 .6) yscale(range(-.03 .6)) ///
				legend(off) graphregion(fcolor(white) lcolor(white)))
				graph export "$pathout/Figs/Overview_complexity_bw.pdf", replace
restore




*** Figure 4 average

preserve
replace naivete=naivete_wins 

gen naivete_res=.
gen se_naivete_res=.
gen a=1

foreach i in simple complex few{
	reg naivete a if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8), cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8)
	replace se_naivete_res=_se[_cons] if dum_`i'==1 & (round==1 | round==2 | round==4 | round==5 | round==7 | round==8)
}

foreach i in nudge selected_replication{
	reg naivete a if dum_`i'==1 & round<9, cluster(subject)
	replace naivete_res=_b[_cons] if dum_`i'==1
	replace se_naivete_res=_se[_cons] if dum_`i'==1
}


collapse naivete_res se_naivete_res, by(treatment)

gen upper=naivete_res+se_naivete_res
gen lower=naivete_res-se_naivete_res


gen order=1 if treatment==4
replace order=3 if treatment==3
replace order=5 if treatment==5
replace order=8 if treatment==8
replace order=10 if treatment==7

				
graph twoway 	(bar naivete_res order if treatment==4,color(gs0)) ///
				(bar naivete_res order if treatment==3,color(gs3)) ///
				(bar naivete_res order if treatment==5,color(gs6))  ///
				(bar naivete_res order if treatment==8,color(gs9)) ///
				(bar naivete_res order if treatment==7,color(gs12)) ///
				(rcap upper lower order, lcolor(black) xtitle("") ///
				xlabel(1 "{it:Complex}" 3 "{it:Simple}" 5 "{it:Few}" 8 "{it:Sel. repl.}" 10 "{it:Nudge}", labsize(medlarge)) ///
				title("Treatment comparisons (mean)", color(black)) ytitle("Average χ ± s.e.m.", size(medlarge)) ///
				yline(0,lcolor(black) lpattern(dash)) ylabel(0 .2 .4 .6) yscale(range(-.03 .6)) ///
				legend(off) graphregion(fcolor(white) lcolor(white)))
				graph export "$pathout/Figs/Overview_complexity_mean_bw.pdf", replace
restore


